/*
 * PSP Software Development Kit - http://www.psvdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * psvdebug.h - Prototypes for the psvDebug library
 *
 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
 *
 * $Id: psvdebug.h 2450 2009-01-04 23:53:02Z oopo $
 */
#ifndef __DEBUG_H__
#define __DEBUG_H__

#ifdef __cplusplus
extern "C" {
#endif

/** 
  * Initialise the debug screen
  */
void psvDebugScreenInit(void);

/**
  * Clear the debug screen.
  */
void psvDebugScreenClear(void);

/**
 * Print a string
 *
 * @param str - String
 *
 * @return The number of characters written
 */
int psvDebugScreenPuts(const char *str);

/**
  * Do a printf to the debug screen.
  *
  * @param fmt - Format string to print
  * @param ... - Arguments
  */
void psvDebugScreenPrintf(const char *fmt, ...) __attribute__((format(printf,1,2)));

/** 
  * Set the background color for the text
  * @note To reset the entire screens bg color you need to call psvDebugScreenClear
  *
  * @param color - A 32bit RGB color
  */
void psvDebugScreenSetBackColor(uint32_t color);

/**
  * Set the text color 
  *
  * @param color - A 32 bit RGB color
  */
void psvDebugScreenSetTextColor(uint32_t color);

/**
  * Set the current X and Y co-ordinate for the screen (in character units)
  */
void psvDebugScreenSetXY(int x, int y);

/** 
  * Get the current X co-ordinate (in character units)
  *
  * @return The X co-ordinate
  */
int psvDebugScreenGetX(void);

/** 
  * Get the current Y co-ordinate (in character units)
  *
  * @return The Y co-ordinate
  */
int psvDebugScreenGetY(void);


#ifdef __cplusplus
}
#endif

#endif